import sys
import unittest

from PySide6.QtGui import QGuiApplication
from PySide6.QtQml import QQmlApplicationEngine

from spd_launcher.config import GlobalConfig
from spd_launcher.com import AutoSpdUpdater


def init():
    app_config = GlobalConfig()
    updater = AutoSpdUpdater(app_config) 


# TODO 自动添加jdk

if __name__ == "__main__":
    
    app = QGuiApplication(sys.argv)
    engine = QQmlApplicationEngine()
    
    engine.load("src/spd_launcher/qml/main.qml")      
    if not engine.rootObjects():
        sys.exit(-1)
    
    sys.exit(app.exec())